<template>
	<view>
		<view class="box">
			<view class="box-a">
				<image src="../../static/nan.png" style="width: 100px; height: 100px; " mode=""></image>
				<button @click="tz(1)">我是老板</button>
			</view>
			<view style="display: flex;display:flex;align-items:center;">
				<view class="hh">

				</view>
				<span>或者</span>
				<view class="hh">

				</view>
			</view>
			<view class="box-a">
				<image src="../../static/siji.png" style="width: 100px; height: 100px; " mode=""></image>
				<button @click="tz(2)">我是司机</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				share_id: "", // 分享id
				truck: {}, // 传过来的车次信息
			}
		},
		onLoad(open) {
			// 获取分享id
			this.share_id = open.id
			this.truck = JSON.parse(open.truck)
		},
		methods: {
			tz(x) {
				let that = this
				// 跳转页面
				uni.navigateTo({
					// url: './tianxiexinxiAB?type=' + x + "&share_id=" + this.share_id,
					url: `./tianxiexinxiAB?type=${x}&share_id=${that.share_id}&truck=${JSON.stringify(that.truck)}`
				});
			}
		}
	}
</script>


<style scoped>
	.box {
		width: 95%;
		margin: 0 auto;
	}

	.box-a {
		height: 240px;
		/* background-color: aqua; */
		text-align: center;
		padding-top: 50px;
	}

	.box-a>button {
		width: 60%;
		height: 44px;
		background: #1890FF;
		box-shadow: 0px 0px 4px 0px rgba(204, 204, 204, 0.5);
		border-radius: 12px;
		color: #FFFFFF;
		margin-top: 10px;
	}

	.hh {
		width: 160px;
		height: 1px;
		background-color: #DDDDDD;
	}

	.box>view>span {
		width: 40px;
		text-align: center;
		font-size: 14px;
		font-weight: 400;
		color: #DDDDDD;
	}
</style>